<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateKdLayoutsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('kd_layouts', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->comment('修改者');
            $table->tinyInteger('page_id')->comment('页面id');
            $table->string('title')->nullable()->comment('标题');
            $table->string('thumb')->comment('展示图片');
            $table->integer('sort')->default(0)->comment('排序');
            $table->tinyInteger('is_show')->default(1)->comment('1显示,-1隐藏');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('kd_layouts');
    }
}
